Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 6 - Printing Resources / Printing Resources Reference
Resources Used Only in Printer Drivers


The Buffering and Input/Output Preferences ('iobm') Resource

The buffering and input/output preferences ('iobm') resource, of type gxUniveralIOPrefsType, defines the timeout and buffering parameters for the driver. This resource is optional; if you do not supply one, QuickDraw GX uses standard I/O with two buffers, each 1 KB long, and defines each timeout value to be 10 seconds. Figure 6-20 shows the structure of the buffering and input/output preferences resource.

Figure 6-20 The buffering and input/output preferences resource

The buffering and input/output preferences resource defines the buffering and timeout values for I/O.

Note
SCSI drivers must use the customIO value in this field. QuickDraw GX does not provide a default implementation of SCSI connections. If you do develop a SCSI driver, you must override the device communications messages and manage all of the communications yourself.
The buffering and input/output preferences resource ID needs to be the constant gxUniversalIOPrefsID. Listing 6-18 shows an example of a buffering and
input/output preferences resource.

Listing 6-18 An example of a buffering and input/output preferences resource

resource gxUniveralIOPrefsType (gxUniversalIOPrefsID, sysHeap,
                                                      purgeable)
{
   standardIO,
   4,             /* 4 buffers */
   2048,          /* each buffer 2 KB */
   10,            /* up to 10 I/O operations pending */
   1200,          /* open/close timeout of 1200 clock ticks */
   1200           /* read/write timeout of 1200 clock ticks */
   };
};
This resource is for the ImageWriter II printer driver, which uses four buffers, each
2 KB long. Ten request blocks will be allocated for communications with this device,
and requests to open, close, read, or write the device will time out in 1200 clock ticks
(20 seconds).


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help